package com.ruoyi.game.controller;


import com.alibaba.fastjson2.JSONObject;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.game.domain.GameUser;
import com.ruoyi.game.domain.GameWithdrawalConfig;
import com.ruoyi.game.service.IGameConfigService;
import com.ruoyi.game.service.IGameUserService;
import com.ruoyi.game.service.IGameWithdrawalConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.math.BigDecimal;
import java.util.List;

/**
 * 软件配置自定义类
 *
 * @author ruoyi
 * @date 2024-03-17
 */
@RestController
@RequestMapping("/api/config")
public class CustomGameConfigController {

    @Autowired
    private IGameConfigService iGameConfigService;

    @Autowired
    private IGameWithdrawalConfigService iGameWithdrawalConfigService;

    /*
添加APP用户
接收JSON数据
*/
    @GetMapping("/getGameConfig")
    public AjaxResult getGameConfig(){
        return AjaxResult.success(iGameConfigService.selectGameConfigByGame());
    }

    @GetMapping("/gatWithdrawalConfig")
    public AjaxResult gatWithdrawalConfig(){
        List<GameWithdrawalConfig> gameWithdrawalConfigs = iGameWithdrawalConfigService.selectGameWithdrawalConfigList(null);
        return AjaxResult.success(gameWithdrawalConfigs);
    }
}
